﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dycox.Workflows
{
    public class ContractInitArguments
    {
        public ContractInitArguments(OperationArguments opargs, Stage stage)
        {
            if (stage == null)
                throw new ArgumentNullException("stage");

            _operationArguments = opargs;
            _stage = stage;
        }

        private OperationArguments _operationArguments;

        public OperationArguments OperationArguments
        {
            get { return _operationArguments; }
        }

        private Stage _stage;

        public Stage Stage
        {
            get { return _stage; }
        }

        public IReflectionRoot AppObject
        {
            get
            {
                if (_operationArguments != null)
                    return _operationArguments.AppObject;
                else
                    return null;
            }
        }

        public ComponentIdentifier ComponentID
        {
            get
            {
                if (_operationArguments != null)
                    return _operationArguments.ComponentID;
                else
                    return ComponentIdentifier.Empty;
            }
        }
    }
}
